package com.itheima.jobs;

import cn.hutool.core.date.DateUtil;
import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.service.OrderSettingService;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class CleanOrderSetting {
    @Reference
    OrderSettingService orderSettingService;
    public void cleanOrderSetting(){
        String time = DateUtil.format(new Date(), "yyyy-MM-dd");
        orderSettingService.deleteByTime(time);
    }
}
